home *** CD-ROM | disk | FTP | other *** search
/ Inside the White House / Inside the White House.iso / export.dir / 00031.ls < prev    next >
Encoding:
Text File  |  1995-07-11  |  1.1 KB  |  36 lines

  1. on printText textString
  2.   if the machineType = 256 then
  3.     set printingFont to "arial"
  4.     openXLib("pmatic.dll")
  5.     set printer to pmatic(mnew)
  6.     printer(mRegister, "10049757-547")
  7.   else
  8.     set printingFont to "helvetica"
  9.     set printer to PrintOMatic(mnew)
  10.     printer(mRegister, "11003142-416")
  11.   end if
  12.   if not objectp(printer) then
  13.     alert("There is no currently selected printer. Printing features are disabled.")
  14.   else
  15.     printer(mSetMargins, 72, 72, 72, 72)
  16.     set w to printer(mGetPageWidth)
  17.     set h to printer(mGetPageHeight)
  18.     printer(mSetTextFont, printingFont)
  19.     printer(mSetTextSize, 10)
  20.     printer(mSetTextStyle, "normal")
  21.     printer(mSetDocumentName, "History of the White House Text")
  22.     set charsPrinted to 0
  23.     repeat while charsPrinted < the number of chars in textString
  24.       printer(mNewPage)
  25.       printer(mTextBox, 0, 0, w, h, 0)
  26.       set charsPrinted to charsPrinted + printer(mSetText, char charsPrinted + 1 to the number of chars in textString of textString)
  27.     end repeat
  28.     printer(mPrint)
  29.     printer(mdispose)
  30.   end if
  31.   if the machineType = 256 then
  32.     closeXLib("pmatic.dll")
  33.   else
  34.   end if
  35. end
  36.